package com.ksyun.cloudhostalarmprocessing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ksyun.cloudhostalarmprocessing.entity.Rules;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 李厚航
 * @since 2024-05-07
 */
@Mapper
public interface RulesMapper extends BaseMapper<Rules> {

    /**
     * 查询一条数据
     * @param rules
     * @return
     */
    Rules selectOne(Rules rules);

    /**
     * 批量查询数据
     * @return
     */
    List<Rules> selectBatch(Rules rules);

    /**
     * 批量添加数据
     * @return
     */
    Integer createBatch(@Param("list") List<Rules> rules);

    /**
     * 添加一条数据
     * @param rules
     * @return
     */
    Integer createOne(Rules rules);

    /**
     * 删除全部
     * @return
     */
    Integer deleteAll();

}
